import request from '@/utils/request'

// 获取批次列表
export function getOrderApi(pageNum, pageSize) {
    return request({
        url: '/sys/product/order',
        method: 'get',
        params: { pageNum, pageSize }
    })
}
// 生成设备编码
export function addOrApi(data) {
    return request({
        url: '/sys/product/order',
        method: 'post',
        data
    })
}
// 导出
export function outOrderApi(orderId) {
    return request({
        url: `/sys/product/order/${orderId}`,
        method: 'post',
        responseType: 'blob'
    })
}
// 导出-租金汇总
export function outApi(startDate, endDate, rentFeeWay, tenantId) {
    return request({
        url: `/sys/meterRentFee/collect/export`,
        method: 'get',
        responseType: 'blob',
        params: { startDate, endDate, rentFeeWay, tenantId }
    })
}
// 交易汇总分页
export function getCollectApi(pageNum, pageSize, startDate, endDate, rentFeeWay, tenantId) {
    return request({
        url: `/sys/meterRentFee/collect/page`,
        method: 'get',
        params: { pageNum, pageSize, startDate, endDate, rentFeeWay, tenantId }
    })
}
// 获取租户列表
export function getTenantApi() {
    return request({
        url: `/sys/meterRentFee/collect/tenants`,
        method: 'get',
    })
}

